# -*- coding:utf-8 -*-
import numpy as np
import pandas as pd

s = pd.Series([1, 3, 6, np.nan, 44, 1])

dates = pd.date_range('20160101', periods=6)
print(dates)

# index 行数据 columns 列数据
df = pd.DataFrame(np.random.randn(6, 4), index=dates, columns=['a', 'b', 'c', 'd'])
print(df)
df1 = pd.DataFrame(np.arange(12).reshape((3, 4)))
print(df1)

print(df1.dtypes)
print(df1.index)
print(df1.columns)
print(df1.values)
print(df1.describe())
print(df1.T)
print(df1.sort_index(axis=1, ascending=False))
print(df1.sort_values(by=1))
